﻿@using EquipmentManager.Entities
@model EquipmentManager.Models.CreateModel<User>

@{
    ViewBag.Title = "Удалить пользователя " + Model.Instance.FullName;
}

@section menu {
    <section class="featured">
            <div class="master-menu">
                @{Html.RenderPartial("AdminMenu");}
            </div>
    </section>
}

<h2>Удалить пользователя @Model.Instance.FullName</h2>

<h3>Вы действительно хотите удалить пользователя @Model.Instance.FullName?</h3>

<table class="bordered">
    <tr>
        <td class="vertical-header">Логин</td>
        <td>@Html.DisplayFor(model => model.Instance.UserName, new { @class = "" })</td>
    </tr>
    <tr>
        <td class="vertical-header">ФИО</td>
        <td>@Html.DisplayFor(model => model.Instance.FullName, new { @class = "" })</td>
    </tr>
    <tr>
        <td class="vertical-header">Роль</td>
        <td>@Html.DisplayFor(model => model.Instance.Role, new { @class = "" })</td>
    </tr>
    <tr>
        <td class="vertical-header">Дата регистрации</td>
        <td>@Html.DisplayFor(model => model.Instance.RegistredDate, new { @class = "" })</td>
    </tr>
</table>

@using (Html.BeginForm("DeleteUser", "Admin", new { @UserId = Model.Instance.Id }, FormMethod.Post))
{
    @Html.HiddenFor(model => model.ParentId)

    <p>
        @Html.ActionLink("Отмена", "PostOffices", new { RegionId = @Model.Instance.Region.Id }, new { @class = "common-btn-large BlueColor" }) <input type="submit" value="Удалить" class="common-btn-large RedColor"/>
    </p>
}